import request from '@/utils/request'

export function login(data) {
  // console.log(data)
  const userName = data.username
  const pwd = data.password
  data = { userName: userName, pwd: pwd }
  // console.log(tel, pwd)
  return request({
    url: '/admin/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout(data) {
  return request({
    url: '/admin/logout',
    method: 'get',
    params: data
  })
}
